
from os import name as os_name, environ, path as os_path


def get_user_home() -> str:    
    if os_name == 'nt':
        return environ.get('USERPROFILE')
    elif os_name == 'posix':
        return os_path.expanduser('~')
    print('Warning: user home not found!')
    return '.'


def check_exists(path: str):
    return os_path.exists(path)